import { purchaseRequest } from '@api/service/purchase'

// 异常采购 - 异常采购 - 异常采购列表查询
export const queryAbnormalPurchaseListService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/abnormalPurchaseListPage',
  type: 'post',
  data,
  loadingFn
});

// 异常采购 - 异常采购 - 导出文件
export const exportAbnormalPurchaseFileService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/exportFile',
  type: 'post',
  data,
  loadingFn,
  isExport: true
});

// 异常采购 - 异常采购 - 暂存待办
export const tempSaveAbnormalPurchaseService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/tempSave',
  type: 'post',
  data,
  loadingFn
});

// 异常采购 - 异常采购 - 退回
export const sendBackAbnormalPurchaseService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/sendBack',
  type: 'post',
  data,
  loadingFn
});

// 异常采购 - 异常采购 - 提交前查询异常类型
export const submitBeforeAbnormalPurchaseService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/submitBeforeQueryExceptionType',
  type: 'post',
  data,
  loadingFn
});
// 异常采购 - 提交
export const submitAbnormalPurchaseService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/submit',
  type: 'post',
  data,
  loadingFn
});

// 异常采购 - 异常采购 - 审核
export const auditAbnormalPurchaseService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/audit',
  type: 'post',
  data,
  loadingFn
});

// 判断追踪的数据是否一致
export const queryTrackingDataIsSameService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/trackingBeforeCheck',
  type: 'post',
  data,
  loadingFn
});

// 异常采购 - 查询追踪数据详情
export const queryTrackDetailService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/trackingBeforeLoad',
  type: 'post',
  data,
  loadingFn
});

// 异常采购 - 提交/暂存追踪数据
export const submitTrackService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/tracking',
  type: 'post',
  data,
  loadingFn
});

// 异常采购 - 反追踪
export const inverseTrackService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/inverseTrace',
  type: 'post',
  data,
  loadingFn
});

// 查询人员信息
export const queryCompanyUserService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/selectDutyUser',
  type: 'get',
  data,
  loadingFn
});

// 查询集团商品管理中心
export const queryManagementCenterService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/selectSkuManagementCenters',
  type: 'get',
  data,
  loadingFn
});
// 查询公司和区域
export const queryCompanyAreaService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/selectProblemCompanyArea',
  type: 'get',
  data,
  loadingFn
});

// 查询问题类型
export const queryProblemTypeService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/selectProblemType',
  type: 'get',
  data,
  loadingFn
});

// 查询异常采购类型表头
export const queryTableFieldService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/listColumnSettings/query',
  type: 'post',
  data,
  loadingFn
});

// 提交异常采购类型表头信息
export const updateTableFieldInfoService = (data, loadingFn) => purchaseRequest({
  url: 'abnormalPurchase/listColumnSettings/update',
  type: 'post',
  data,
  loadingFn
});
